from selenium.webdriver.remote.webdriver import WebDriver
from page.login_page import LoginPage
from page.search_page import SearchPage


class MainPage:
    def __init__(self, driver: WebDriver):
        self.driver = driver
    def to_search_page(self):
        el3 = self.driver.find_element_by_id("com.xqxc.customer:id/iv_search")
        el3.click()
        return SearchPage(self.driver)

    def to_login(self):
        el2 = self.driver.find_element_by_id("com.xqxc.customer:id/tabMeIv")
        el2.click()
        return LoginPage(self.driver)

